package day02;

/**
 * - 字符：char   0~2^16-1
 * -
 */
public class Demo03 {
    public static void main(String[] args) {
        /*字符 char  用单引号''括起来，有且只有一个*/
        char c = 'a';//97
        System.out.println((int)c);
        c = 'A';//65
        System.out.println((int)c);
        c = '0'; //48
        System.out.println((int)c);
        c = '中';//20013
        System.out.println((int)c);

        char cc = 'A'+32;
        System.out.println("cc="+cc);
        cc  = 'q';
        int num = (int)cc;
        if(num>=65 && num<=90){//代表大写字母
            //将字母转为小写输出
            char c3 = (char)(num+32);
            System.out.println("已经将大写字母:"+cc+"转为小写字母:"+c3);
        }else{
            System.out.println("你输入的是小写字母:"+cc);
        }


    }
}
